﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Idte.Common.Region
{
    public class Region
    {
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int RegionId { get; set; }
        public RegionType RegionType { get; set; }
        public string NativeName { get; set; }
        public string EnglishName { get; set; }
        [InverseProperty("Parent")]
        ICollection<Region> SubRegions { get; set; }
        public Country Country { get; set; }
        [ForeignKey("ParentId")]
        public Region Parent { get; set; }
        public int ParentId { get; set; }
    }
}
